package com.heihei.common.response;

public enum ResponseEnum {

    SUCCEED(200, "成功"),
    FAILED(500, "内部服务器错误"),
    MISSING_PARAMS(400, "缺少参数"),
    EXCEPTION(500, "系统异常"),
    RECORD_NOT_EXIST(603, "记录不存在"),
    LOGIN_ERROR(1008, "用户名或密码错误"),
    FAILURE(404, "Api不存在"),
    PARAM_LESS_ERROR(600, "缺少参数"),
    PARAM_TYPE_ERROR(601, "参数类型转换错误"),
    WRONG_OPERATE(602, "非法操作"),
    CANT_DELETE(603, "无法删除"),
    ILLEGAL_PARAM(604, "非法参数"),
    SYSTEM_ERROR(500, "内部服务器错误"),
    RECORD_NOT_EXISTS(701, "记录不存在"),
    USERNAME_EXISTS(701, "用户名已存在"),
    PHONE_EXISTS(702, "手机号已存在"),
    EMAIL_EXISTS(703, "邮箱已存在"),
    TOKEN_NOT_VALID(1000, "token无效");

    private Integer code;
    private String message;

    private ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}